﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Open.Product.Domain.Model;

namespace OpenApi.EntityFrameworkCore
{
    public class OpenApiDbContext : DbContext
    {

        public OpenApiDbContext(DbContextOptions<OpenApiDbContext> options) : base(options)
        {

        }


        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
        }

        void ConfigureIntegration(EntityTypeBuilder<Product> builder)
        {
            builder.ToTable("BaseProducts");
            builder.HasIndex(t => new { t.TenantId });
        }
    }
}